package assists
{
	import flash.display.Bitmap;
	import flash.utils.Dictionary;

	public class UIManager
	{
		[Embed(source = "../assets/uiImage/btnBack.png")]
		public var btnBack:Class;
		
		[Embed(source = "../assets/uiImage/dimian.png")]
		public var componentBack:Class;
		
		[Embed(source = "../assets/uiImage/weatherBack.png")]
		public var weatherBack:Class;
		
		//======
		
		[Embed(source = "../assets/uiImage/timeLine/scenic.png")]
		public var timeLineScenic:Class;
		
		[Embed(source = "../assets/uiImage/timeLine/eating.png")]
		public var timeLineEating:Class;
		
		[Embed(source = "../assets/uiImage/timeLine/fun.png")]
		public var timeLineFun:Class;
		
		[Embed(source = "../assets/uiImage/timeLine/markStart.png")]
		public var timeLineMarkStart:Class;
		
		[Embed(source = "../assets/uiImage/timeLine/markEnd.png")]
		public var timeLineMarkEnd:Class;
		
		[Embed(source = "../assets/uiImage/timeLine/timeLine.png")]
		public var timeLineLine:Class;
		
		[Embed(source="../assets/uiImage/timeLine/hotel.png")]
		public var timeLineHotel:Class
		//======
		
		[Embed(source = "../assets/uiImage/pathComponent/arrowRight.png")]
		public var arrowIcon:Class;
		
		[Embed(source = "../assets/uiImage/pathComponent/descBack.png")]
		public var paperImageBack:Class;
		
		[Embed(source = "../assets/uiImage/pathComponent/guideIcon.png")]
		public var pathGuideIcon:Class;
		
		[Embed(source = "../assets/uiImage/pathComponent/rili.png")]
		public var dateMarkBack:Class;
		
		//======
		
		[Embed(source = "../assets/uiImage/mapMark/hong.png")]
		public var mapMarkRed:Class;
		
		[Embed(source = "../assets/uiImage/mapMark/huang.png")]
		public var mapMarkYellow:Class;
		
		[Embed(source = "../assets/uiImage/mapMark/lan.png")]
		public var mapMarkBlue:Class;
		
		//======
		
		[Embed(source = "../assets/uiImage/guidePanel/backBtn.png")]
		public var backBtnIcon:Class;
		
		[Embed(source = "../assets/navigation/line.png")]
		public var cutLine:Class;
		
		[Embed(source="../assets/uiImage/huibeijing.png")]
		public var backgroundWallPaper:Class;
		
		//======
		
		[Embed(source="../assets/uiImage/downloadResource/progressLine.png")]
		public var progressLine:Class;
		
		[Embed(source="../assets/uiImage/downloadResource/download.png")]
		public var downloadIcon:Class;
		
		//========
		
		[Embed(source="../assets/uiImage/selfPath/lock.png")]
		public var lock:Class;
		
		[Embed(source="../assets/uiImage/selfPath/lockOpen.png")]
		public var lockOpen:Class;
		
		[Embed(source="../assets/uiImage/selfPath/arrowDown.png")]
		public var arrowDown:Class;
		
		[Embed(source="../assets/uiImage/selfPath/arrowUp.png")]
		public var arrowUp:Class;
		
		[Embed(source="../assets/uiImage/selfPath/delete.png")]
		public var deleteBtn:Class;
		
		[Embed(source="../assets/uiImage/selfPath/dateChangeBtn.png")]
		public var dateChangeBtn:Class;
		
		//========
		
		[Embed(source="../assets/uiImage/cityChoose/CityChooseBtn.png")]
		public var cityChooseBtn:Class;
		
		//========
		[Embed(source="../assets/viewSpot/sun/ccSun.jpg")]//cha shan
		public var ccSun:Class;
		
		[Embed(source="../assets/viewSpot/sun/csSun.jpg")]//chi shan
		public var csSun:Class;
		
		[Embed(source="../assets/viewSpot/sun/cstSun.jpg")]//cheng shan tou
		public var cst:Class;
		
		[Embed(source="../assets/viewSpot/sun/tehSun.jpg")]//tian e hy
		public var tehSun:Class;
//		
		
		[Embed(source="../assets/viewSpot/detail/ticket.png")]
		public var ticketPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/phone.png")]
		public var phonePng:Class;
		
		[Embed(source="../assets/viewSpot/detail/web.png")]
		public var webPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/heart.png")]
		public var heartPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/path.png")]
		public var pathPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/time.png")]
		public var timePng:Class;
		
		[Embed(source="../assets/viewSpot/detail/dingwei.png")]
		public var dingweiPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/traffic.png")]
		public var trafficPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/share.png")]
		public var sharePng:Class;
		
		[Embed(source="../assets/viewSpot/detail/detail.png")]
		public var detailPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/around.png")]
		public var aroundPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/commit.png")]
		public var commitPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/btnBack.png")]
		public var btnBackPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/redHeart.png")]
		public var redHeartPng:Class;
		
		[Embed(source="../assets/viewSpot/detail/map.png")]
		public var mapPng:Class;
		
		[Embed(source="../assets/viewSpot/loading.png")]
		public var loadingPng:Class;
		
		[Embed(source="../assets/viewSpot/titleBlue.png")]
		public var paopaoBack:Class;
		
		[Embed(source="../assets/weico/input.png")]
		public var inputPng:Class;
		
		[Embed(source="../assets/public/arrowYellow.png")]
		public var arrowYellowPng:Class;
		
		[Embed(source="../assets/public/arrowGreen.png")]
		public var arrowGreenPng:Class;
		
		[Embed(source="../assets/public/arrowRed.png")]
		public var arrowRedPng:Class;
		
		[Embed(source="../assets/public/music.png")]
		public var musicPng:Class;
		
		[Embed(source="../assets/public/back.png")]
		public var backPng:Class;
		
		[Embed(source="../assets/public/dingwei.png")]
		public var navigationPng:Class;
		
		[Embed(source="../assets/public/jian.png")]
		public var jianPng:Class;
		
		[Embed(source="../assets/public/jia.png")]
		public var jiaPng:Class;
		
		[Embed(source="../assets/public/buttonBlue.png")]
		public var blueBack:Class;
		
		[Embed(source="../assets/public/guideSelect.png")]
		public var guideSelect:Class;
		
		[Embed(source="../assets/public/paopaoMusic.png")]
		public var paopaoMusicPng:Class;
		
		[Embed(source="../assets/public/paopaoDetail.png")]
		public var paopaoDetailPng:Class;
		
		[Embed(source="../assets/public/paopaoVisit.png")]
		public var paopaoVisitPng:Class;
		
		[Embed(source="../assets/public/slideBtn.png")]
		public var slideBtn:Class;
		
		[Embed(source="../assets/public/slideBtnBack.png")]
		public var slideBtnBack:Class;
		
		[Embed(source="../assets/public/search.png")]
		public var searchPng:Class;
		
		[Embed(source="../assets/public/guide.png")]
		public var guideBack:Class;
		
		[Embed(source="../assets/public/searchField.png")]
		public var searchFieldPng:Class;
		
//		[Embed(source="../assets/public/commitBack.png")]
//		public var commitBack:Class;
		
		[Embed(source="../assets/public/commentBtn.png")]
		public var commentBtn:Class;
		
		[Embed(source="../assets/public/noPic.jpg")]
		public var noPic:Class;
		
		[Embed(source="../assets/public/commentBtnClick.png")]
		public var commentBtnClick:Class;
		
		[Embed(source="../assets/navigation/setout.png")]
		public var setoutPng:Class;
		
		[Embed(source="../assets/navigation/normal.png")]
		public var navigationNormalPng:Class;
		
		[Embed(source="../assets/navigation/topBack.png")]
		public var topBackPng:Class;
		
		[Embed(source="../assets/navigation/click.png")]
		public var navigationClickPng:Class;
		
		[Embed(source="../assets/navigation/ball.png")]
		public var navigationBallPng:Class;
		
		[Embed(source="../assets/navigation/circle.png")]
		public var navigationCirclePng:Class;
		
		[Embed(source="../assets/weico/whiteLineBack.png")]
		public var whiteLineBack:Class;
		
		[Embed(source="../assets/weico/backGround.jpg")]
		public var weiBoGround:Class;
		
		[Embed(source="../assets/weico/qq.png")]
		public var qqWeibo:Class;
		
		[Embed(source="../assets/weico/sina.png")]
		public var sinaWeibo:Class;
		
		[Embed(source="../assets/weico/camera.png")]
		public var cameraPic:Class;
		
		[Embed(source="../assets/weico/pic.png")]
		public var weiboPic:Class;
		
		[Embed(source="../assets/public/rotate.png")]
		public var rotatePng:Class;
		
		[Embed(source="../assets/public/visited.png")]
		public var visitedPng:Class;
		
		[Embed(source="../assets/media/play.png")]
		public var playPng:Class;
		
		[Embed(source="../assets/media/stop.png")]
		public var stopPng:Class;
		
		[Embed(source="../assets/media/processLineBack.png")]
		public var processLineBack:Class;
		
		[Embed(source="../assets/media/lineProcess.png")]
		public var lineProcess:Class;
		
		[Embed(source="../assets/media/lineBtn.png")]
		public var lineBtn:Class;
		
		[Embed(source="../assets/public/loadIcon.swf")]
		public var loadIcon:Class;
		
		private var _recList:Dictionary = new Dictionary();
		/**
		 * 
		 * @param className 需要生成资源的类
		 * @param isGenerateNew 在已经有了当前资源的基础上 是否需要生成一个新的bitmap
		 * @return 
		 * 
		 */		
		public function generateBmp(className:Class,isGenerateNew:Boolean = false):Bitmap
		{
			if(_recList[className] && isGenerateNew == false)
			{
				return _recList[className];
			}else
			{
				var bmp:Bitmap = new className();
				_recList[className] = bmp;
				return bmp;
			}
		}
		
		public function clearBmp(className:Class):void
		{
			if(!_recList[className]) return;
			_recList[className] = null;
			delete _recList[className];
		}
		
	}
}